

<%@page import="java.util.List"%>
<%@page import="com.cn.dao.DepartmentDao"%>
<%@page import="com.cn.entity.Department"%>
<%@page import="com.cn.entity.Doctor"%>


<%@page import="com.cn.dao.DoctorDao"%>




<%@page import="com.cn.entity.Doctor"%>
<%@page import="com.cn.entity.Doctor"%>

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>北京医院</title>
</head>
<body>
<h4>医生修改</h4>
<form action="DoctorUpdateAction" method="post">
<table>
<% Department dep=null;
int doctorid=0;
String id=request.getParameter("doctorid");
if (id!=null){doctorid=Integer.parseInt(id);}
DoctorDao ud=new DoctorDao(); 
Doctor doctor=ud.scanOne(doctorid);
%>
<tr>
<td>医生编号</td>
<td><input type="text" name="doctor.doctorno" value="<%=doctor.getDoctorno()%>"></td>
</tr>

<tr>
<td>用户名</td>
<td><input type="text" name="doctor.doctorname" value="<%=doctor.getDoctorname()%>"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="text" name="doctor.password" value="<%=doctor.getPassword()%>"></td>
</tr>
<tr>
<td>真实姓名</td>
<td><input type="text" name="doctor.xingming" value="<%=doctor.getXingming()%>"></td>
</tr>
<tr>
<td>电话</td>
<td><input type="text" name="doctor.phone"  value="<%=doctor.getPhone()%>"></td>
</tr>
<tr>
<td>身份证号码</td>
<td><input type="text" name="doctor.identity"  value="<%=doctor.getIdentity()%>"></td>
</tr>
<tr>
<td>E_mail</td>
<td><input type="text" name="doctor.email"  value="<%=doctor.getEmail()%>"></td>
</tr>

<tr>
<td>职称</td>
<td><input type="text" name="doctor.title"  value="<%=doctor.getTitle()%>"></td>
</tr>

<tr>
<td>科室</td>
<td><select name="departmentname" >
<%Department department=doctor.getDepartment();DepartmentDao ded=new DepartmentDao();List<Department> li=ded.scanAll(); %>
<% for (int i=0;i<li.size();i++)

{  dep=li.get(i);  
%>
<option><%=dep.getDepartmentname()%></option>

<%} %>

</select>

</td>
</tr>

<tr>
<td>权限</td>
<td><input type="text" name="doctor.pro"  value="<%=doctor.getPro()%>"></td>
</tr>

<tr>
<td>自我介绍</td>
<td><input type="text" name="doctor.selfintroduce"  value="<%=doctor.getSelfintroduce()%>"></td>
</tr>

<tr>
<td><input type="hidden" name="doctor.doctorid"  value="<%=doctor.getDoctorid()%>"></td>
<td><input type="submit" value="修改"></td>
</tr>



</table>


</form>
</body>
</html>